Oscillator circuit and method for adjusting oscillation frequency of same

ABSTRACT

An oscillator comprises a data storage unit, an oscillation unit, and a control unit. The data storage unit is adapted to store a plurality of reference condition codes and a plurality of reference control codes. The oscillation unit is adapted to output an oscillation signal having an oscillation frequency that varies according to a control code. The control unit is adapted to generate the control code with a target value based on the reference condition codes and the reference control codes and a current condition code input to the control unit. Where control code has the target value, the oscillation unit outputs the oscillation signal with the oscillation frequency substantially equal to a target oscillation frequency.

BACKGROUND OF THE INVENTION

1. Field of the Invention

Embodiments of the present invention relate generally to oscillators andmethods of adjusting the oscillation frequency of the oscillators. Moreparticularly, embodiments of the invention relate to oscillators andmethods of adjusting the oscillation frequency of the oscillators tocompensate for changing external environmental factors such astemperature, and power supply voltage levels.

A claim of priority is made to Korean Patent Application No. 2005-60836filed on Jul. 6, 2005, the disclosure of which is hereby incorporated byreference in its entirety.

2. Description of Related Art

An oscillator is a device used to generate a continuous output waveform.For example, an oscillator typically comprises a tuned electroniccircuit adapted to generate an alternating current such as a periodicsignal. Most oscillators can be roughly classified into one of twogroups: external oscillators such as crystal oscillators, and internaloscillators included in semiconductor devices.

Historically, oscillators have been used in a variety of electronicdevices such as computer systems, semiconductor devices, andcommunication devices. More recently, oscillators have been adopted in anumber of in portable electronic devices such as cellular phones,personal digital assistants (PDAs), smart batteries of cellular phones,and so on. In order to meet the performance requirements of suchportable devices, much research has been devoted to designingoscillators having lower power consumption, lower cost, and improvedoutput accuracy and stability.

FIG. 1 is a circuit diagram illustrating a typical configuration of aconventional oscillator.

Referring to FIG. 1, an oscillator 10 includes a reference voltagegenerator 1, a reference current generator 2 and an oscillation unit 3.Oscillation unit 3 includes a comparator 4, a capacitor 5 and a switch6.

Reference voltage generator 1 generates a reference voltage “Vr”,reference current generator 2 generates a reference current “Ir”, andoscillation unit 3 generates an oscillation signal “Osc” with a logicstate based on a comparison between reference voltage “Vr” and acomparison voltage “Vc” produced by reference current “Ir”.

Comparator 4 has a reference input terminal coupled to an outputterminal of reference voltage generator 1 and a comparison inputterminal coupled to an output terminal of reference current generator 2.Capacitor 5 and switch 6 are coupled in parallel to the comparison inputterminal of comparator 4.

When capacitor 5 is charged by reference current Ir, comparison voltage“Vc,” which is apparent at the comparison input terminal of comparator4, increases. When comparison voltage Vc is higher than referencevoltage Vr, switch 6 is turned on in response to a change in the logicstate of oscillation signal Osc, and comparison voltage Vc rapidlydecreases to a ground voltage by discharging through switch 6.

Switch 6 is turned off in response to a change in the logic state ofoscillation signal Osc after comparison voltage Vc is discharged throughswitch 6. The above sequence of voltage changes is repeated so thatoscillation signal Osc continues to oscillate between a first logicstate and a second logic state.

The oscillator typically provides a timing signal function (e.g, aclock) for an electrical system. Accordingly, if the output frequency ofthe oscillator does not correspond to a target frequency of the system,the system may not function correctly.

The output frequency of the oscillator can vary based on a number offactors such as the process conditions used when manufacturing theoscillator, and external environmental factors such as power voltage andtemperature, to name but a few. For example, the output frequency of anoscillator may not be stable over a wide temperature range of about −30°C. through 140° C.

To avoid problems arising from instability, conventional oscillatorsoften provide various compensation circuits. For example, a referencevoltage generator sensitive to power voltage and temperature may bereplaced by a high-cost product that is insensitive to temperaturedifferences. Also, compensator circuits may be configured to compensatefor temperature differences by generating a current that is in inverselyproportional to a temperature of the reference current generator.

Unfortunately, these compensation circuits are generally complex, andthey tend to increase the power consumption, test times, and cost of theoscillator.

SUMMARY OF THE INVENTION

Accordingly, various embodiments of the present invention are providedto address the need for power, cost, and time efficient oscillatorscapable of stable operation even under changing environmentalconditions.

According to one embodiment of the invention, an oscillator is provided.The oscillator comprises a data storage unit, an oscillation unit, and acontrol unit. The data storage unit is adapted to store a plurality ofreference condition codes and a plurality of reference control codes.The oscillation unit is adapted to output an oscillation signal havingan oscillation frequency that varies according to a control code. Thecontrol unit is adapted to generate the control code with a target valuebased on the reference condition codes and the reference control codesand a current condition code input to the control unit. Where controlcode has the target value, the oscillation unit outputs the oscillationsignal with the oscillation frequency substantially equal to a targetoscillation frequency.

According to another embodiment of the invention, a method of adjustingan oscillation frequency of an oscillation signal generated by anoscillator is provided. The oscillator comprises a data storage unitadapted to store a plurality of reference condition codes and aplurality of reference control codes, an oscillation unit adapted tooutput the oscillation signal with the oscillation frequency having avalue that depends on a control code, and a control unit adapted togenerate the control code with a target value based on a currentcondition code, the reference control codes, and the reference conditioncodes. The method comprises generating each reference control code as arespective value of the control code for which the oscillation frequencyof the oscillation signal is substantially equal to a target oscillationfrequency when a corresponding one of the reference condition codes isinput to the control unit as the current condition code in response toone or more environmental conditions of the oscillator. The methodfurther comprises storing the reference control codes and the referencecondition codes in the data storage unit. The control unit generates thecontrol code with a target value based on the current condition code,the reference control codes, and the reference condition codes. Theoscillation unit outputs the oscillation signal with the oscillationfrequency having a target value substantially equal to the targetoscillation frequency in response to the control code.

BRIEF DESCRIPTION OF THE DRAWINGS

The invention is described below in relation to several embodimentsillustrated in the accompanying drawings. Throughout the drawings likereference numbers indicate like exemplary elements, components, orsteps. In the drawings:

FIG. 1 is a circuit diagram illustrating a conventional oscillator;

FIG. 2 is a block diagram illustrating an oscillator according to oneembodiment of the invention;

FIG. 3 is a graph illustrating output characteristics of a referencevoltage generation unit in the oscillator of FIG. 2;

FIG. 4 is a graph illustrating output characteristics of a referencecurrent generation unit in the oscillator of FIG. 2;

FIG. 5 is a circuit diagram of an oscillation unit shown in FIG. 2according to one embodiment of the invention;

FIG. 6 is a circuit diagram of a capacitor unit shown in FIG. 5according to one embodiment of the invention;

FIG. 7 is a flow chart illustrating a method of adjusting theoscillation frequency of an oscillation signal output by the oscillatorshown in FIG. 2 according to one embodiment of the invention;

FIG. 8 is a graph illustrating an exemplary relationship between atemperature code and a control code; and,

FIG. 9 is a flow chart illustrating a method of adjusting theoscillation frequency of an oscillation signal output by the oscillatorshown in FIG. 2 according to another embodiment of the invention.

DESCRIPTION OF EXEMPLARY EMBODIMENTS

Exemplary embodiments of the invention are described below withreference to the corresponding drawings. These embodiments are presentedas teaching examples. The actual scope of the invention is defined bythe claims that follow.

FIG. 2 is a block diagram of an oscillator 100 according to an exemplaryembodiment of the invention.

Referring to FIG. 2, oscillator 100 includes a reference voltagegeneration unit 110, an analog-to-digital (A/D) conversion unit 140, areference current generation unit 130, an oscillation unit 120, and acontrol unit 160.

Reference voltage generation unit 110 generates a reference voltage witha level that varies continuously based on a temperature of oscillator100 and provides the reference voltage to oscillation unit 120 and A/Dconversion unit 140.

FIG. 3 is a graph illustrating output characteristics of referencevoltage generation unit 110 of oscillator 100 in FIG. 2.

As illustrated in FIG. 3, the level of the reference voltage output byreference voltage generation unit 110 decreases continuously as thetemperature of oscillator 100 increases. Reference voltage generationunit 110 is a simple, low-cost product that is used in a variety ofconventional apparatuses.

In addition to providing the reference voltage, which is used togenerate an oscillation signal, reference voltage generation unit 110may be also used as a temperature sensor. For example, using the graphshown in FIG. 3, the temperature of oscillator 100 can be uniquelydetermined based on the level of the reference voltage.

A/D conversion unit 140 converts the reference voltage output byreference voltage generation unit 110 into digital data. The digitaldata derived from the reference voltage will be referred to as a“condition code” because it can be used to determine the levels ofvarious environmental conditions such as temperature and a powervoltage.

Reference current generation unit 130 generates a reference current andprovides the reference current to oscillation unit 120. Oscillation unit120 generates an oscillation signal based on the reference current.Preferably, reference current generation unit 130 generates thereference current with a level that is not affected by externalenvironmental factors such as temperature, power voltage, and so on.

FIG. 4 is a graph illustrating output characteristics of referencecurrent generation unit 130. As illustrated in FIG. 4, reference currentgeneration unit outputs the reference current with a substantiallyconstant level even in the presence of drastic temperature changes inoscillator 100.

Oscillation unit 120 outputs an oscillation signal in response to thereference voltage output by reference voltage generation unit 110, thereference current output by reference current generation unit 130, and acontrol code output by control unit 160. The control code output bycontrol unit 160 is a digital signal derived from the condition codeoutput by A/D conversion unit 140. The control code is used to controlthe operation of oscillation unit 120.

FIG. 5 is a circuit diagram of oscillation unit 120 according to oneembodiment of the invention.

Referring to FIG. 5, oscillation unit 120 comprises a comparator 121, adischarge switch 122 and a capacitor unit 124.

Comparator 121 has a reference input terminal coupled to an outputterminal of reference voltage generator 110 and a comparison inputterminal coupled to an output terminal of reference current generator130. Capacitor unit 124 and discharge switch 122 are coupled in parallelto the comparison input terminal of comparator 121. Discharge switch 122is turned on and off in response to an oscillation signal OSC output bycomparator 121.

Comparator 121 outputs oscillation signal OSC with a logic state basedon a voltage difference between a reference voltage Vr apparent at thereference terminal and a comparison voltage Vc apparent at thecomparison input terminal. When comparison voltage Vc of comparator 121is higher than reference voltage Vr, discharge switch 122 is turned onby oscillation signal OSC and comparison voltage Vc decreases to aground voltage by discharging through discharge switch 122. In contrast,when reference voltage Vr rises above comparison voltage Vc, dischargeswitch 122 is turned off.

As the temperature of oscillator 100 increases, reference voltage Vrdecreases, comparison voltage Vc increases above reference voltage Vr,and as a result, an oscillation frequency FOSC of oscillation signal OSCincreases. Conversely, as the temperature of oscillator 100 decreases,oscillation frequency FOSC of oscillation signal OSC decreases.

Capacitor unit 124 is charged by the reference current Ir output byreference current generation unit 130. A capacitance of capacitor unit124 may be varied in response to the control code output by control unit160.

FIG. 6 is a circuit diagram of capacitor unit 124 in FIG. 5 according toone embodiment of the invention.

Referring to FIG. 6, capacitor unit 124 includes first through sixthcapacitors C1 through C6 and first through sixth switches S1 through S6.Capacitors C1 through C6 are connected in parallel between thecomparison input terminal of comparator 121 and ground via respectiveswitches S1 through S6. Switches S1 through S6 are controlled to openand close in response to the control code output by control unit 160.

The respective capacitances of capacitors C1 through C6 preferablyincrease monotonically so that first capacitor C1 has the smallestcapacitance and sixth capacitor C6 has the greatest capacitance.

Switches S1 through S6 are respectively connected to capacitors C1through C6 in series. Each of switches S1 through S6 is turned on inresponse to the inverse of a corresponding bit of the control codeoutput by control unit 160. For example, first switch S1 turns on inresponse to the inverse CTRL1′ of a control signal CTRL1, which is aleast significant bit (LSB) of the control code, and sixth switch S6turns on in response to the inverse CTRL6 of a control signal CTRL6,which is a most significant bit (MSB) of the control code output bycontrol unit 160. Accordingly, the capacitance of capacitor unit 124 canbe varied based on the control code output by control unit 160.

As described above, oscillation frequency FOSC of oscillation signal OSCincreases as the temperature of oscillator 100 increases, and decreasesas the temperature of oscillator 100 decreases. The inverses of controlsignals CTRL1 through CTRL6 of the control code output by control unit160 are respectively input to switches S1 through S6 of capacitor unit124 to adjust the capacitance of capacitor unit 124. When thetemperature of oscillator 100 increases, control unit 160 decreases avalue of the control code to increase the capacitance of capacitor unit124 in order to decrease oscillation frequency FOSC of oscillationsignal OSC. In contrast, when the temperature of oscillator 100decreases, control unit 160 increases the value of the control code toincrease oscillation frequency FOSC of oscillation signal OSC.

Switches S1 through S6 can also be controlled by oscillation signal OSCwithout inverting control signals CTRL1 through CTRL6. In this case,when the temperature of oscillator 100 increases, control unit 160increases the value of the control code, and when the temperature ofoscillator 100 decreases, control unit 160 decreases the value of thecontrol code. Consequently, oscillation frequency FOSC of oscillationsignal OSC may be controlled by adjusting the capacitance of capacitorunit 124, and the capacitance of capacitor unit 124 may be adjustedbased on the control code output by control unit 160.

Data storage unit 150 stores various kinds of data under control of acontrol of control unit 160. For example, data storage unit 150 maystore the condition codes output by A/D conversion unit 140 and thecontrol codes output by control unit 160. Data storage unit 150typically includes memory devices such as a data register, read-onlymemory (ROM), and so on.

Control unit 160 inputs a plurality of control codes to oscillation unit120 based on external environmental factors such as temperature, powervoltage, and so on, and stores a plurality of condition codes andcontrol codes into data storage unit 150. Control unit 160 alsodetermines a proper control code corresponding to a current conditioncode, on a basis of the condition codes and the control codes stored indata storage unit 150 to input the proper control code to oscillationunit 120. The operation of control unit 160 is described in furtherdetail below with reference to a method of compensating for anoscillation signal.

Reference voltage generation unit 110, oscillation unit 120, referencecurrent generation unit 130 and A/D conversion unit 140 are preferablyimplemented in a single chip, and data storage unit 150 and control unit160 are preferably implemented as software on a storage device and aprocessor. Implementing the components in this way tends to minimize thepower consumption by oscillator 100. In other embodiments, elements 110through 160 can all be included in a single chip.

FIG. 7 is a flow chart illustrating a method of adjusting theoscillation frequency an oscillation signal output by oscillator 100according to one embodiment of the present invention. In general, themethod illustrated in FIG. 7 is performed to compensate for changes inexternal environmental conditions such as the temperature and powersupply voltage of oscillator 100. The method illustrated in FIG. 7 isexplained in the context of oscillator 100 shown in FIG. 2, with controlunit 160 controlling most of the operations. However, the method can beperformed by other devices.

In the description that follows, exemplary method steps are denoted byparentheses (XXX) to distinguish them from exemplary elements or systemcomponents such as those illustrated in FIG. 2.

Referring to FIG. 7, control unit 160 inputs a first control code tocapacitor unit 124 of oscillation unit 120 when oscillator 100 has afirst temperature (S1). The first temperature of oscillator 100 is atemperature near a lowest temperature within the operating temperaturerange of oscillator 100.

When oscillation signal OSC is output by oscillation unit 120 inresponse to the first control code, control unit 160 determines whetheran oscillation frequency FOSC of oscillation signal OSC is equivalent toa target oscillation frequency Ftarget (S2).

Where oscillation frequency FOSC is not equivalent to target oscillationfrequency Ftarget, control unit 160 determines whether or notoscillation frequency FOSC is higher than target oscillation frequencyFtarget (S3). Where oscillation frequency FOSC is higher than targetoscillation frequency Ftarget, control unit 160 decreases the controlcode by a predetermined number of bits (e.g., one bit) and inputs thedecreased control code to oscillation unit 120 (S4). On the other hand,where oscillation frequency FOSC is lower than target oscillationfrequency Ftarget, control unit 160 increases the control code by apredetermined number of bits (e.g., one bit) and inputs the increasedcontrol code to oscillation unit 120 (S5).

Where oscillation frequency FOSC is equivalent to target oscillationsignal Ftarget, control unit 160 stores the first control code and afirst temperature code output by A/D conversion unit 140 correspondingto the first temperature into data storage unit 150 (S6). The firsttemperature code is one type of condition code that can be produced byoscillator 100 and stored in data storage unit 150.

Control unit 160 inputs a second control code to capacitor unit 124 ofoscillation unit 120 when oscillator 100 has a second temperature (S11).The second temperature of oscillator 100 is a temperature near a highesttemperature within the operating temperature range of oscillator 100.

When oscillation signal OSC is output by oscillation unit 120 inresponse to the second control code, control unit 160 determines whetherthe oscillation frequency FOSC of oscillation signal OSC is equivalentto target oscillation frequency Ftarget (S12).

Where oscillation frequency FOSC is not equivalent to target oscillationfrequency Ftarget, control unit 160 determines whether or notoscillation frequency FOSC is higher than target oscillation frequencyFtarget (S13). Where oscillation frequency FOSC is higher than targetoscillation frequency Ftarget, control unit 160 decreases the controlcode by a predetermined number of bits (for example, one bit) and inputsthe decreased control code to oscillation unit 120 (S14). On the otherhand, where oscillation frequency FOSC is lower than target oscillationfrequency Ftarget, control unit 160 increases the control code by apredetermined number of bits (for example, one bit) to input theincreased control code to oscillation unit 120(S15).

Where oscillation frequency FOSC is equivalent to target oscillationfrequency Ftarget, control unit 160 stores the second temperature codeand a second temperature code output by A/D conversion unit 140corresponding to the second control code into data storage unit 150(S16).

Through the above method including steps S1 through S16, data storageunit 150 stores the first temperature code indicating the firsttemperature and the first control code for generating the oscillationsignal having target oscillation frequency Ftarget at the firsttemperature. In addition, data storage unit 150 stores the secondtemperature code indicating the second temperature and the secondcontrol code for generating the oscillation signal having targetoscillation frequency Ftarget at the second temperature.

Control unit 160 may determine a control code for generating anoscillation signal having target oscillation frequency Ftarget at anytemperature between the first and second temperatures by using the firstcontrol code and the second control code for compensating theoscillation signal according to the first and second temperatures.

FIG. 8 is a graph illustrating an exemplary relationship between atemperature code and a control code in oscillator 100.

As illustrated by FIG. 8, the control code varies linearly with thetemperature code. Accordingly, the control code for generatingoscillation signal OSC with target oscillation frequency Ftarget at anytemperature may be calculated by the following Equation 1.FtargetCode=(Code2−Code1)/(Var2−Var1)×Var+(Var1×Code2−Var2×Code1)/(Var1−Var2).  (Equation 1)In Equation 1, FtargetCode is a target control code used to generatetarget oscillation signal Ftarget, Code1 is a first control code, Code2is a second control code, Var is a current temperature code, Var1 is afirst temperature code, and Var2 is a second temperature code.

Where A/D conversion unit 140 outputs a temperature code correspondingto a current temperature (S20), control unit 160 generates a targetcontrol code by using the first temperature code, the second temperaturecode, the first control code and the second control code stored in datastorage unit 150. Control unit 160 inputs the target control code tooscillation unit 120 and oscillation unit 120 outputs a compensatedoscillation signal corresponding to the target control code (S21).

The first and second control codes can be referred to as “referencecontrol codes” and the first and second temperature codes can bereferred to as “reference condition codes” because all of these codesare used as references for determining the value of FtargetCode.

A method of adjusting the frequency of oscillation signal OSC tocompensate for changes in the temperature of oscillator 100 is describedwith reference to FIG. 7. However, other variations such as variationsof a power voltage can also influence the frequency of oscillationsignal OSC.

The condition code output by A/D conversion unit 140 may include generalinformation related to external environmental factors, such astemperature, power voltage, and so on, because reference voltagegeneration unit 110 not only has specific temperature variationinformation, but also has general information related to variations inexternal environmental factors, such as a temperature, a power voltage,and so on.

By using the above procedure illustrated in FIG. 7, adjustment orcompensation can be performed according to power voltage. FIG. 9illustrates compensation according to a power voltage.

FIG. 9 is a flow chart illustrating a method of adjusting theoscillation frequency FOSC of oscillation signal OSC in oscillator 100based on variations in the power voltage of oscillator 100 according toa another example embodiment of the present invention. Although themethod of FIG. 9 is illustrated in the context of oscillator 100, thoseskilled in the art will understand that other hardware and or softwarearrangements and other devices can be used to implement the method.

Referring to FIG. 9, control unit 160 inputs a first control code tocapacitor unit 124 of oscillation unit 120 at a first power voltage(S31). The first power voltage is a power voltage near a lowest powervoltage within the operating power voltage range of oscillator 100.

When the oscillation signal is output by oscillation unit 120 inresponse to the first control code, control unit 160 determines whetheror not oscillation frequency FOSC is equivalent to a target oscillationfrequency Ftarget (S32).

Where oscillation frequency FOSC is not equivalent to a targetoscillation frequency Ftarget, control unit 160 determines whether ornot oscillation frequency FOSC is higher than target oscillationfrequency Ftarget (S33). Where oscillation frequency FOSC is higher thantarget oscillation frequency Ftarget, control unit 160 decreases thecontrol code by a predetermined number of bits (e.g., one bit) to inputthe decreased control code to oscillation unit 120 (S34), and whereoscillation frequency FOSC is lower than target oscillation frequencyFtarget, control unit 160 increases the control code by a predeterminednumber of bits (e.g., one bit) to input the increased control code tooscillation unit 120 (S35).

Where oscillation frequency FOSC is equivalent to target oscillationfrequency Ftarget, control unit 160 stores the first control code and afirst power voltage code output by A/D conversion unit 140 correspondingto the first power voltage into data storage unit 150 (S36). The firstpower voltage code is a condition code, and the condition code is namedas the power voltage code since FIG. 9 illustrates the method ofcompensating for an oscillation signal with respect to the power voltagevariation.

Control unit 160 inputs a second control code to capacitor unit 124 ofoscillation unit 120 at a second power voltage (S41). The second powervoltage of oscillator 100 is a power voltage near the highest powervoltage within the operating power voltage range of oscillator 100.

Where the oscillation signal is output by oscillation unit 120 inresponse to the second control code, control unit 160 determines whetheror not oscillation frequency FOSC is equivalent to target oscillationfrequency Ftarget (S42).

Where oscillation frequency FOSC is not equivalent to target oscillationfrequency Ftarget, control unit 160 determines whether or notoscillation frequency FOSC is higher than target oscillation frequencyFtarget (S43). Where oscillation frequency FOSC is higher than targetoscillation frequency Ftarget, control unit 160 decreases the controlcode by a predetermined number of bits (e.g., one bit) to input thedecreased control code to oscillation unit 120 (S44). On the other hand,where oscillation frequency FOSC is lower than target oscillationfrequency Ftarget, control unit 160 increases the control code by apredetermined number of bits (e.g., one bit) to input the increasedcontrol code to oscillation unit 120 (S45).

Where oscillation frequency FOSC is equivalent to a target oscillationfrequency Ftarget, control unit 160 stores the control code and a secondpower voltage code output by A/D conversion unit 140 corresponding tothe second control code into data storage unit 150 (S46).

Through the above procedure including steps S31 through S46, datastorage unit 150 stores the first power voltage code indicating thefirst power voltage and the first control code for generating the targetoscillation signal Ftarget at the first power voltage. In addition, datastorage unit 150 stores the second power voltage code indicating thesecond power voltage and the second control code for generating targetoscillation signal Ftarget at the second power voltage.

Control unit 160 may determine a control code for generating anoscillation signal having target oscillation frequency Ftarget at anypower voltage between the first and second power voltages by using thefirst control code and the second control code to adjust the oscillationsignal according to the first and second power voltages. The controlcode for generating target oscillation signal Ftarget at any powervoltage may be calculated by the following Equation 2.FtargetCode=(Code2−Code1)/(Var2−Var1)×Var+(Var1×Code2−Var2×Code1)/(Var1−Var2).  (Equation2)In Equation 2, FtargetCode is a target control code for generatingtarget oscillation signal Ftarget, Code1 is a first control code, Code2is a second control code, Var is a current power voltage code, Var1 is afirst power voltage code, and Var2 is a second power voltage code.

Where A/D conversion unit 140 outputs a power voltage code for a currentpower voltage (S50), control unit 160 generates target control codeFtargetCode using the first power voltage code, the second power voltagecode, the first control code and the second control code stored in datastorage unit 150. Control unit 160 inputs the target control code tooscillation unit 120 and oscillation unit 120 outputs a compensatedoscillation signal corresponding to the target control code (S51).

The first and second control codes can be referred to as “referencecontrol codes” and the first and second power voltage codes can bereferred to as “reference condition codes” because all of these codesare used as references for determining the value of FtargetCode.

As described above, the oscillator and the method of adjusting theoscillation frequency of the oscillation signal according to the aboveexample embodiments of the present invention may transform a targetcapacitance into data such as a temperature code, a power voltage codeand so on. The target capacitance is determined according to externalenvironmental factors, such as temperature, power voltage and so on. Thedata corresponding to the target capacitance is stored and theoscillation signal may be adjusted, or compensated for based on thestored data.

Accordingly, the oscillation signal may be compensated for according toexternal environmental factors such as a temperature, a power voltage,etc. while using a low-cost oscillator.

The foregoing preferred embodiments are teaching examples. Those ofordinary skill in the art will understand that various changes in formand details may be made to the exemplary embodiments without departingfrom the scope of the present invention as defined by the followingclaims.

1. An oscillator, comprising: a data storage unit adapted to store aplurality of reference condition codes and a plurality of referencecontrol codes; an oscillation unit adapted to output an oscillationsignal having an oscillation frequency that varies according to acontrol code; and, a control unit computing the control code with atarget value using a mathematical equation using the reference conditioncodes, the reference control codes, and a current condition code inputto the control unit, wherein the current condition code corresponds toat least one current environmental condition of the oscillator, andwherein, when the control code has the target value, the oscillationunit outputs the oscillation signal with the oscillation frequencysubstantially equal to a target oscillation frequency, and wherein eachof the reference control codes comprises a respective value of thecontrol code for which the oscillation frequency of the oscillationsignal is substantially equal to the target oscillation frequency when acorresponding one of the reference condition codes is input to thecontrol unit as the current condition code in response to one of the atleast one current environmental condition of the oscillator.
 2. Anoscillator, comprising: a data storage unit adapted to store a pluralityof reference condition codes and a plurality of reference control codes;an oscillation unit adapted to output an oscillation signal having anoscillation frequency that varies according to a control code; a controlunit computing the control code with a target value using a mathematicalequation using the reference condition codes, the reference controlcodes, and a current condition code input to the control unit, whereinthe current condition code corresponds to at least one currentenvironmental condition of the oscillator, and wherein, when the controlcode has the target value, the oscillation unit outputs the oscillationsignal with the oscillation frequency substantially equal to a targetoscillation frequency; a reference voltage generation unit adapted togenerate a reference voltage signal with a level that variescontinuously according to external environmental factors and provide thereference voltage signal to the oscillation unit; an analog-to-digital(A/D) conversion unit adapted to convert the reference voltage signalinto digital data corresponding to the current condition code; and, areference current generation unit adapted to generate a referencecurrent and provide the reference current to the oscillation unit. 3.The oscillator of claim 2, wherein the oscillation unit comprises: acomparator having a reference input terminal coupled to an outputterminal of the reference voltage generation unit and a comparison inputterminal coupled to an output of the reference current generation unit,wherein the comparator is adapted to output the oscillation signal basedon a voltage difference between the reference input terminal and thecomparison input terminal; a capacitor unit connected between thecomparison input terminal and a first electrical potential, wherein thecapacitor unit is charged by the reference current, and a capacitance ofthe capacitor unit is controlled by the control code; and, a dischargeswitch connected between the comparison input terminal and a secondelectrical potential and controlled by the oscillation signal.
 4. Theoscillator of claim 3, wherein the capacitor unit comprises: a pluralityof capacitors coupled in parallel between the comparison input terminaland the first electrical potential; and, a plurality of switches coupledin series with the respective capacitors and controlled by correspondingbits of the control code.
 5. The oscillator of claim 4, wherein thecapacitance of each one of the capacitors is proportional to a level ofthe bit in the control code that controls the capacitor.
 6. Theoscillator of claim 3, wherein the discharge switch is turned on todischarge the comparison input terminal to ground when the level of acomparison voltage apparent at the comparison input terminal is greaterthan the level of the reference voltage signal, and turned off when thelevel of the reference voltage signal is higher than the comparisonvoltage.
 7. The oscillator of claim 2, wherein the level of thereference voltage signal decreases as the temperature of the oscillatorincreases.
 8. The oscillator of claim 2, wherein the level of thereference current is not affected by the temperature or a power voltageof the oscillator.
 9. The oscillator of claim 2, wherein the A/Dconversion unit, the reference current generation unit and theoscillation unit are included in a single chip, and the data storageunit and the control unit are included in an external device.
 10. Theoscillator of claim 2, wherein the external environmental factorscomprise at least one of a temperature and a power voltage of theoscillator.
 11. A method of adjusting an oscillation frequency of anoscillation signal generated by an oscillator comprising a data storageunit adapted to store a plurality of reference condition codes and aplurality of reference control codes, an oscillation unit adapted tooutput the oscillation signal with the oscillation frequency having avalue that depends on a control code, and a control unit, the methodcomprising: generating each reference control code as a respective valueof the control code for which the oscillation frequency of theoscillation signal is substantially equal to a target oscillationfrequency when a corresponding one of the reference condition codes isinput to the control unit as a current condition code; storing thereference control codes and the reference condition codes in the datastorage unit; computing the control code with a target value using thecontrol unit, wherein the control unit receives the current conditioncode and computes the control code with the target value using amathematical equation using the reference condition codes, the referencecontrol codes, and the current condition code, and wherein the currentcondition code corresponds to at least one current environmentalcondition of the oscillator; and, by operation of the oscillation unitoutputting the oscillation signal with the oscillation frequency havinga target value substantially equal to the target oscillation frequencyin response to the control code, wherein generating each referencecontrol code comprises: determining whether the oscillation frequency issubstantially the same as the target frequency; varying the control codeand inputting the varied control code to the oscillator unit when theoscillation frequency is not substantially the same as the targetfrequency; and, determining the reference control code to be a value ofthe varied control code for which the oscillation frequency issubstantially the same as the target frequency.
 12. The method of claim11, wherein varying the control code comprises: decreasing the controlcode and inputting the decreased control code to the oscillator unitwhen the oscillation frequency is higher than the target frequency; and,increasing the control code and inputting the increased control code tothe oscillator unit when the oscillation frequency is lower than thetarget frequency.
 13. A method of adjusting an oscillation frequency ofan oscillation signal generated by an oscillator comprising a datastorage unit adapted to store a plurality of reference condition codesand a plurality of reference control codes, an oscillation unit adaptedto output the oscillation signal with the oscillation frequency having avalue that depends on a control code, and a control unit, the methodcomprising: generating each reference control code as a respective valueof the control code for which the oscillation frequency of theoscillation signal is substantially equal to a target oscillationfrequency when a corresponding one of the reference condition codes isinput to the control unit as a current condition code; storing thereference control codes and the reference condition codes in the datastorage unit; computing the control code with a target value using thecontrol unit, wherein the control unit receives the current conditioncode and computes the control code with the target value using amathematical equation using the reference condition codes, the referencecontrol codes, and the current condition code, and wherein the currentcondition code corresponds to at least one current environmentalcondition of the oscillator; and, by operation of the oscillation unit,outputting the oscillation signal with the oscillation frequency havinga target value substantially equal to the target oscillation frequencyin response to the control code, wherein the plurality of referencecontrol codes comprises two (2) reference control codes, and theplurality of reference condition codes comprises two (2) referencecondition codes, and wherein computing the control code with the targetvalue using a mathematical equation using the current condition code,the reference control codes, and the reference condition codes comprisescomputing a target control code FtargetCode according to the followingequation:FtargetCode=(Code2−Code 1)/(Var2−Var1)×Var+(Var1×Code2−Var2×Code1)/(Var1−Var2); wherein Code1 represents a first control code among thereference control codes, Code2 represents a second control code amongthe reference control codes, Var represents the current condition code,Var1 represents a first condition code among the reference conditioncodes, and Var2 represents a second condition code among the referencecondition codes.